3.2 \(\int x^2 (d+i c d x) (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=105 \[ \frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )-\frac {i b d \tan ^{-1}(c x)}{4 c^3}+\frac {i b d x}{4 c^2}+\frac {b d \log \left (c^2 x^2+1\right )}{6 c^3}-\frac {b d x^2}{6 c}-\frac {1}{12} i b d x^3 \]

[Out]

1/4*I*b*d*x/c^2-1/6*b*d*x^2/c-1/12*I*b*d*x^3-1/4*I*b*d*arctan(c*x)/c^3+1/3*d*x^3*(a+b*arctan(c*x))+1/4*I*c*d*x
^4*(a+b*arctan(c*x))+1/6*b*d*ln(c^2*x^2+1)/c^3

________________________________________________________________________________________

Rubi [A]  time = 0.09, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {43, 4872, 12, 801, 635, 203, 260} \[ \frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {b d \log \left (c^2 x^2+1\right )}{6 c^3}+\frac {i b d x}{4 c^2}-\frac {i b d \tan ^{-1}(c x)}{4 c^3}-\frac {b d x^2}{6 c}-\frac {1}{12} i b d x^3 \]

Antiderivative was successfully verified.

[In]

Int[x^2*(d + I*c*d*x)*(a + b*ArcTan[c*x]),x]

[Out]

((I/4)*b*d*x)/c^2 - (b*d*x^2)/(6*c) - (I/12)*b*d*x^3 - ((I/4)*b*d*ArcTan[c*x])/c^3 + (d*x^3*(a + b*ArcTan[c*x]
))/3 + (I/4)*c*d*x^4*(a + b*ArcTan[c*x]) + (b*d*Log[1 + c^2*x^2])/(6*c^3)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rubi steps

\begin {align*} \int x^2 (d+i c d x) \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )-(b c) \int \frac {d x^3 (4+3 i c x)}{12 \left (1+c^2 x^2\right )} \, dx\\ &=\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{12} (b c d) \int \frac {x^3 (4+3 i c x)}{1+c^2 x^2} \, dx\\ &=\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {1}{12} (b c d) \int \left (-\frac {3 i}{c^3}+\frac {4 x}{c^2}+\frac {3 i x^2}{c}+\frac {3 i-4 c x}{c^3 \left (1+c^2 x^2\right )}\right ) \, dx\\ &=\frac {i b d x}{4 c^2}-\frac {b d x^2}{6 c}-\frac {1}{12} i b d x^3+\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {(b d) \int \frac {3 i-4 c x}{1+c^2 x^2} \, dx}{12 c^2}\\ &=\frac {i b d x}{4 c^2}-\frac {b d x^2}{6 c}-\frac {1}{12} i b d x^3+\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )-\frac {(i b d) \int \frac {1}{1+c^2 x^2} \, dx}{4 c^2}+\frac {(b d) \int \frac {x}{1+c^2 x^2} \, dx}{3 c}\\ &=\frac {i b d x}{4 c^2}-\frac {b d x^2}{6 c}-\frac {1}{12} i b d x^3-\frac {i b d \tan ^{-1}(c x)}{4 c^3}+\frac {1}{3} d x^3 \left (a+b \tan ^{-1}(c x)\right )+\frac {1}{4} i c d x^4 \left (a+b \tan ^{-1}(c x)\right )+\frac {b d \log \left (1+c^2 x^2\right )}{6 c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 88, normalized size = 0.84 \[ \frac {d \left (a c^3 x^3 (4+3 i c x)+b c x \left (-i c^2 x^2-2 c x+3 i\right )+2 b \log \left (c^2 x^2+1\right )+b \left (3 i c^4 x^4+4 c^3 x^3-3 i\right ) \tan ^{-1}(c x)\right )}{12 c^3} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*(d + I*c*d*x)*(a + b*ArcTan[c*x]),x]

[Out]

(d*(a*c^3*x^3*(4 + (3*I)*c*x) + b*c*x*(3*I - 2*c*x - I*c^2*x^2) + b*(-3*I + 4*c^3*x^3 + (3*I)*c^4*x^4)*ArcTan[
c*x] + 2*b*Log[1 + c^2*x^2]))/(12*c^3)

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 113, normalized size = 1.08 \[ \frac {6 i \, a c^{4} d x^{4} + 2 \, {\left (4 \, a - i \, b\right )} c^{3} d x^{3} - 4 \, b c^{2} d x^{2} + 6 i \, b c d x + 7 \, b d \log \left (\frac {c x + i}{c}\right ) + b d \log \left (\frac {c x - i}{c}\right ) - {\left (3 \, b c^{4} d x^{4} - 4 i \, b c^{3} d x^{3}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{24 \, c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+I*c*d*x)*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/24*(6*I*a*c^4*d*x^4 + 2*(4*a - I*b)*c^3*d*x^3 - 4*b*c^2*d*x^2 + 6*I*b*c*d*x + 7*b*d*log((c*x + I)/c) + b*d*l
og((c*x - I)/c) - (3*b*c^4*d*x^4 - 4*I*b*c^3*d*x^3)*log(-(c*x + I)/(c*x - I)))/c^3

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+I*c*d*x)*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 98, normalized size = 0.93 \[ \frac {i c d a \,x^{4}}{4}+\frac {d a \,x^{3}}{3}+\frac {i c d b \arctan \left (c x \right ) x^{4}}{4}+\frac {d b \arctan \left (c x \right ) x^{3}}{3}+\frac {i b d x}{4 c^{2}}-\frac {i b d \,x^{3}}{12}-\frac {b d \,x^{2}}{6 c}+\frac {b d \ln \left (c^{2} x^{2}+1\right )}{6 c^{3}}-\frac {i b d \arctan \left (c x \right )}{4 c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d+I*c*d*x)*(a+b*arctan(c*x)),x)

[Out]

1/4*I*c*d*a*x^4+1/3*d*a*x^3+1/4*I*c*d*b*arctan(c*x)*x^4+1/3*d*b*arctan(c*x)*x^3+1/4*I*b*d*x/c^2-1/12*I*b*d*x^3
-1/6*b*d*x^2/c+1/6*b*d*ln(c^2*x^2+1)/c^3-1/4*I*b*d*arctan(c*x)/c^3

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 99, normalized size = 0.94 \[ \frac {1}{4} i \, a c d x^{4} + \frac {1}{3} \, a d x^{3} + \frac {1}{12} i \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c d + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d+I*c*d*x)*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/4*I*a*c*d*x^4 + 1/3*a*d*x^3 + 1/12*I*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b*c*d
 + 1/6*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*d

________________________________________________________________________________________

mupad [B]  time = 0.71, size = 99, normalized size = 0.94 \[ -\frac {\frac {d\,\left (-2\,b\,\ln \left (c^2\,x^2+1\right )+b\,\mathrm {atan}\left (c\,x\right )\,3{}\mathrm {i}\right )}{12}+\frac {b\,c^2\,d\,x^2}{6}-\frac {b\,c\,d\,x\,1{}\mathrm {i}}{4}}{c^3}+\frac {d\,\left (4\,a\,x^3+4\,b\,x^3\,\mathrm {atan}\left (c\,x\right )-b\,x^3\,1{}\mathrm {i}\right )}{12}+\frac {c\,d\,\left (a\,x^4\,3{}\mathrm {i}+b\,x^4\,\mathrm {atan}\left (c\,x\right )\,3{}\mathrm {i}\right )}{12} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(a + b*atan(c*x))*(d + c*d*x*1i),x)

[Out]

(d*(4*a*x^3 - b*x^3*1i + 4*b*x^3*atan(c*x)))/12 - ((d*(b*atan(c*x)*3i - 2*b*log(c^2*x^2 + 1)))/12 - (b*c*d*x*1
i)/4 + (b*c^2*d*x^2)/6)/c^3 + (c*d*(a*x^4*3i + b*x^4*atan(c*x)*3i))/12

________________________________________________________________________________________

sympy [A]  time = 3.08, size = 167, normalized size = 1.59 \[ \frac {i a c d x^{4}}{4} - \frac {b d x^{2}}{6 c} + \frac {i b d x}{4 c^{2}} + \frac {b d \left (\frac {\log {\left (11 b c d x - 11 i b d \right )}}{24} + \frac {9 \log {\left (11 b c d x + 11 i b d \right )}}{40}\right )}{c^{3}} + x^{3} \left (\frac {a d}{3} - \frac {i b d}{12}\right ) + \left (\frac {b c d x^{4}}{8} - \frac {i b d x^{3}}{6}\right ) \log {\left (i c x + 1 \right )} - \frac {\left (15 b c^{4} d x^{4} - 20 i b c^{3} d x^{3} - 8 b d\right ) \log {\left (- i c x + 1 \right )}}{120 c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d+I*c*d*x)*(a+b*atan(c*x)),x)

[Out]

I*a*c*d*x**4/4 - b*d*x**2/(6*c) + I*b*d*x/(4*c**2) + b*d*(log(11*b*c*d*x - 11*I*b*d)/24 + 9*log(11*b*c*d*x + 1
1*I*b*d)/40)/c**3 + x**3*(a*d/3 - I*b*d/12) + (b*c*d*x**4/8 - I*b*d*x**3/6)*log(I*c*x + 1) - (15*b*c**4*d*x**4
 - 20*I*b*c**3*d*x**3 - 8*b*d)*log(-I*c*x + 1)/(120*c**3)

________________________________________________________________________________________